package com.cb.web.wasf;

import javax.servlet.jsp.PageContext;

/**
 * @author CBO
 */
public abstract class Principal {

    static public Principal getFromPageContext(PageContext pageContext) {
        DefaultSession session = DefaultSession.getFromPageContext(pageContext);
        return session != null ? session.getPrincipal() : null;
    }

    public abstract boolean hasRole(String roleName);
}
